-
Notifications
You must be signed in to change notification settings - Fork 233
fix(pending-state): correct reflection of aria in pending controller #5730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7edc5d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Tachometer resultsChromebutton permalinktest-basic
combobox permalinkbasic-test
light-dom-test permalink
picker permalinkbasic-test
progress-circle permalinkbasic-test
Firefoxbutton permalinktest-basic
combobox permalinkbasic-test
light-dom-test permalink
picker permalinkbasic-test
progress-circle permalinkbasic-test
|
.changeset/seven-nails-wave.md
Outdated
'@spectrum-web-components/button': patch | ||
'@spectrum-web-components/reactive-controllers': patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Will this be read with our current changelog script? Would you prefer adding separate changeset for each package instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are other changesets with mulitple packages, i dont think it should be an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what Rajdeep means is, even though this works, our change log script does not pick up multiple packages (only the first one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like how this has come together.
One suggestion: Would you like to add a quick screen reader test video to the PR. This would help the original reporter (and future contributors) to verify the behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I left one blocking comment: could we confirm the double label behavior?
Pull Request Test Coverage Report for Build 18209190251Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 👍 I think this is the best path forward! I just left one 1 small nit comment.
Please check why the stories are loading differently from prod: https://opensource.adobe.com/spectrum-web-components/storybook/iframe.html?globals=system%3Aspectrum-two&args=&id=picker-pending--s&viewMode=story In the PR link I can't see the pending state when opening the story in a new tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing my approval until we get clarification on the stories :)
Also, unrelated to your changes, but when we have a pending picker there is no VO indication that you can't open it (but it is effectively "disabled") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tested with voice over on a button with a slotted label and an aria-label
only the aria-label
is read. I don't think what is read should differ from what is on screen. This fixes the initial problem, but there are some a11y pitfalls with allowing this.
Can we make sure the docs recommends not using label
or aria-label
if they are supplying visible text via the slot?
This is a good call! But as per spec, But I agree this is out-of-scope for this PR and better tackled on the Button refactor! 😃 |
Description
This PR fixes aria-label handling issues in button components and improves accessibility for pending state controllers. The changes ensure that aria-labels are properly managed and preserved across component state changes, providing better screen reader support.
Key Changes:
Button Component (@spectrum-web-components/button):
PendingState Controller (@spectrum-web-components/reactive-controllers):
Motivation and context
The previous implementation had timing issues, allowing aria-label updates to occur before slot content changes were fully processed, leading to inconsistent accessibility behavior. Additionally, the pending state controller was using
aria-valuetext
instead ofaria-label
for progress indicators, which is not the recommended approach for accessibility.These changes ensure that:
Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Device review